Check if the function is declared before declaring it.#36
Check if the function is declared before declaring it.#36clue merged 1 commit intoreactphp:masterfrom NikoGrano:patch-1
Conversation
|
Sounds like you're inheriting class and function definitions with pthreads, then including the Composer autoloader again. If this is the case, that's the real problem to be fixed. If there is some other scenario that can lead to this problem, please describe it. |
|
Well, yes I need to include autoloader again. Without it I get undefined error. 🙃 |
|
I recommend using |
|
I'm using none currently, but lez see... |
|
@trowski Confirmed same issue. |
WyriHaximus
left a comment
There was a problem hiding this comment.
This makes total sense to me but I rather see that we use a functions_include.php like we do in other packages, for example: https://github.com/reactphp/promise-stream/blob/master/src/functions_include.php
|
@WyriHaximus Thank you! I will make requested changes after I finish some critical work. |
|
@Niko9911 There's something else going wrong. We use pthreads in Here is our definition of |
|
@WyriHaximus Requested changes are made. |
WyriHaximus
left a comment
There was a problem hiding this comment.
LGTM 👍
One more thing, could you squash them into one commit?
|
Sure! |
|
Done, ty. |
|
Status? @clue |
|
Cheers, will tag this shortly 👍 |
|
THANK YOU EVERYBODY! |
|
Ok |






In case you use pthreads or something else related to threading you might encounter this issue. It happens only with functions and is fixable only by adding these checks. Another way to avoid this is to wrap functions as static into classes.